package com.wxq.shape;

import android.graphics.Path;
import android.graphics.RectF;

public class MapArc extends MapPath {

	RectF rect ;
	float startAngle;
	float sweepAngle;
	boolean useCenter;
	
	
	public MapArc(RectF rect, float startAngle, float sweepAngle,
			boolean useCenter) {
		super(new Path());
		this.rect = rect;
		this.startAngle = startAngle;
		this.sweepAngle = sweepAngle;
		this.useCenter = useCenter;
		mPath.addArc(rect, startAngle, sweepAngle);
		if (useCenter) {
			mPath.close();
		}
		setDrawPath(new Path(mPath)); 
	}

	public MapArc(RectF rect, float startAngle, float sweepAngle,
			boolean useCenter,float xOffset,float yOffset)
	{
		this(rect, startAngle, sweepAngle, useCenter);
		offset(xOffset, yOffset);
	}
	
	
	
	public RectF getRect() {
		return rect;
	}

	public void setRect(RectF rect) {
		this.rect = rect;
	}

	public float getStartAngle() {
		return startAngle;
	}

	public void setStartAngle(float startAngle) {
		this.startAngle = startAngle;
	}

	public float getSweepAngle() {
		return sweepAngle;
	}

	public void setSweepAngle(float sweepAngle) {
		this.sweepAngle = sweepAngle;
	}

	public boolean isUseCenter() {
		return useCenter;
	}

	public void setUseCenter(boolean useCenter) {
		this.useCenter = useCenter;
	}
}
